<?php
require_once('../../auth/auth.php');

//get values from POST	 
	$status=$_POST['status'];
	$comments=$_POST['comments'];
	
include 'db_Connect.php';
	
$giftStatusQuery = "UPDATE GiftDelivery SET status='".$status
			."', comments='".$comments
			."' WHERE user_id='".$_SESSION['SESS_USER_ID']."'";
$giftStatus = mysql_query($giftStatusQuery);	//preferences update executes



//$preference = "INSERT INTO AdoptionPreferences 
//			(user_id, num_adults, num_children, toyOK, deliveryOK, spanishOK, other)
	//	VALUES
   //      ('$_SESSION['SESS_USER_ID']', '$num_adults', '$num_children', '$toyOK', '$deliveryOK', '$spanishOK', '$other)";

//$result = mysql_query($preference);


if($giftStatus){
	echo("Gift delivery status update succeeded");
	header("Location:../gift-status.php");
} else{
	echo("Gift delivery status update failed");
}

include 'db_Close.php';
?>

